/*!
 * Bootstrap Colorpicker v2.5.1
 * https://itsjavi.com/bootstrap-colorpicker/
 *
 * Originally written by (c) 2012 Stefan Petre
 * Licensed under the Apache License v2.0
 * http://www.apache.org/licenses/LICENSE-2.0.txt
 *
 */
 
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none; // none by default, but block on "open" of the menu
  float: left;
  min-width: 160px;
  padding: 5px 0;
  margin: 2px 0 0; // override default ul
  background-clip: padding-box;

  // Aligns the dropdown menu to right
  //
  // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
  &.pull-right {
    right: 0;
    left: auto;
  }
}


@mixin bgImg($imgBase64) {
  background-image: url("#{$imgBase64}");
}

@mixin borderRadius($size) {
  -webkit-border-radius: $size;
  -moz-border-radius: $size;
  border-radius: $size;
}

.colorpicker-saturation {
  width: 100px;
  height: 100px;
  @include bgImg('');
  cursor: crosshair;
  float: left;
  i {
    display: block;
    height: 5px;
    width: 5px;
    border: 1px solid #000;
    @include borderRadius(5px);
    position: absolute;
    top: 0;
    left: 0;
    margin: -2px 0 0 -2px;
    b {
      display: block;
      height: 1px;
      width: 1px;
      border: 1px solid #fff;
      @include borderRadius(1px);
    }
  }
}

.colorpicker-2x .colorpicker-saturation {
  width: 200px;
  height: 200px;
}

.colorpicker-2x .colorpicker-hue,
.colorpicker-2x .colorpicker-alpha {
  width: 30px;
  height: 200px;
}

.colorpicker-2x .colorpicker-color{height:40px;}
.colorpicker-2x .colorpicker-color i {
  height:20px;
  line-height:20px;
}

.colorpicker-2x{
  .colors, .selectors-color{
    width:20px;
    height:20px;
    border:1px solid #333;
  }
}


.form-control {
  display: block;
  width: 200px;
  height: 33px; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
  padding: 6px 12px;
  color: #555;
  background-color:#fff;
  border: 1px solid #ccc;
  border-radius: 4px; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
  box-shadow:inset 0 1px 1px rgba(0,0,0,.075);
  transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;

  // Unstyle the caret on `<select>`s in IE10+.
  &::-ms-expand {
    border: 0;
    background-color: transparent;
  }

  // Disabled and read-only inputs
  //
  // HTML5 says that controls under a fieldset > legend:first-child won't be
  // disabled if the fieldset is disabled. Due to implementation difficulty, we
  // don't honor that edge case; we style them as disabled anyway.
  &[disabled],
  &[readonly],
  fieldset[disabled] & {
    background-color: #999;
    opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
  }

  &[disabled],
  fieldset[disabled] & {
    cursor: disabled;
  }

}

.input-group{
  white-space:nowrap;
  vertical-align:middle;
  position:relative;
  .input-group-addon {
    padding: 7px 11px;
    line-height: 1;
    color: #555;
    text-align: center;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    border-left:0;
    border-top-left-radius:0;
    border-bottom-left-radius:0;
    position:absolute;
    top:0;right:0;
  }
}
	

.colorpicker-hue,
.colorpicker-alpha {
  width: 15px;
  height: 100px;
  float: left;
  cursor: row-resize;
  margin-left: 4px;
  margin-bottom:4px;
}

.colorpicker-hue i,
.colorpicker-alpha i {
  display: block;
  height: 1px;
  background: #000;
  border-top: 1px solid #fff;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin-top: -1px;
}

.colorpicker-hue {
  @include bgImg('');
}

.colorpicker-alpha {
  @include bgImg('');
  display: none;
}

.colorpicker-saturation,
.colorpicker-hue,
.colorpicker-alpha {
  background-size: contain;
}

.colorpicker {
  padding: 4px;
  min-width: 130px;
  margin-top: 1px;
  @include borderRadius(4px);
  border:1px solid #ccc;
  background:#fff;
  z-index: 2500;
  h3{font-size:12px;}
  .backups{margin-top:7px;}
}

.colorpicker:before,
.colorpicker:after {
  display: table;
  content: "";
  line-height: 0;
}

.colorpicker:after {
  clear: both;
}

.colorpicker:before {
  content: '';
  display: inline-block;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #ccc;
  border-bottom-color: rgba(0, 0, 0, 0.2);
  position: absolute;
  top: -7px;
  left: 6px;
}

.colorpicker:after {
  content: '';
  display: inline-block;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #ffffff;
  position: absolute;
  top: -6px;
  left: 7px;
}

.colorpicker div {
  position: relative;
}

.colorpicker.colorpicker-with-alpha {
  min-width: 140px;
}

.colorpicker.colorpicker-with-alpha .colorpicker-alpha {
  display: block;
}

.colorpicker-color {
  height: 10px;
  margin-top:5px;
  clear: both;
  /*.newColor{
    @include bgImg('');
    background-position: 0 100%;
  }*/
}

.colorpicker-color i {
  float:left;
  height:10px;
  width:50%;
  text-align:center;
}

.colorpicker-selectors {
  margin-top: 5px;
  overflow:hidden;
}

.colorpicker-backups{overflow:hidden;}

.colorpicker-selectors i, .colorpicker-backups i {
  cursor: pointer;
  float: left;
  height: 10px;
  width: 10px;
}

.colorpicker-selectors i + i, .colorpicker-backups i+i {
  margin-left: 3px;
}

.colorpicker-element .input-group-addon i,
.colorpicker-element .add-on i {
  display:block;
  border:1px solid #ccc;
  cursor: pointer;
  height:17px;
  width: 17px;
}

.colorpicker.colorpicker-inline {
  position: relative;
  display: inline-block;
  float: none;
  z-index: auto;
}

.colorpicker.colorpicker-horizontal {
  width: 110px;
  min-width: 110px;
  height: auto;
}

.colorpicker.colorpicker-horizontal .colorpicker-saturation {
  margin-bottom: 4px;
}

.colorpicker.colorpicker-horizontal .colorpicker-color {
  width: 100px;
}

.colorpicker.colorpicker-horizontal .colorpicker-hue,
.colorpicker.colorpicker-horizontal .colorpicker-alpha {
  width: 100px;
  height: 15px;
  float: left;
  cursor: col-resize;
  margin-left: 0px;
  margin-bottom: 4px;
}

.colorpicker.colorpicker-horizontal .colorpicker-hue i,
.colorpicker.colorpicker-horizontal .colorpicker-alpha i {
  display: block;
  height: 15px;
  background: #ffffff;
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  border: none;
  margin-top: 0px;
}

.colorpicker.colorpicker-horizontal .colorpicker-hue {
  @include bgImg('');
}

.colorpicker.colorpicker-horizontal .colorpicker-alpha {
  @include bgImg('');
}

.colorpicker-right{
  &:before, &:after {
    top:50%;
    margin-top:-10px;
    border-top:7px solid transparent;
    border-bottom:7px solid transparent;
    
  }
  &:before{left:-15px;
    border-right:7px solid #ccc;
  }
  &:after{left:-13px;
    border-right:7px solid #fff;
  }
}

.colorpicker-no-arrow:before {
  border-right: 0;
  border-left: 0;
}

.colorpicker-no-arrow:after {
  border-right: 0;
  border-left: 0;
}

.colorpicker,
.colorpicker-alpha,
.colorpicker-saturation,
.colorpicker-hue,
.colorpicker-selectors {
  &.colorpicker-visible {
    display: block;
  }
}

.colorpicker,
.colorpicker-alpha,
.colorpicker-saturation,
.colorpicker-hue,
.colorpicker-selectors {
  &.colorpicker-hidden {
    display: none;
  }
}

.colorpicker-inline.colorpicker-visible {
  display: inline-block;
}
